<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>按键精灵 Lite</title>
    <link href="https://cdn.bootcdn.net/ajax/libs/daisyui/4.12.10/full.min.css" rel="stylesheet">
    <link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            margin: 0;
            padding: 20px;
        }
        
        .glass-card {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 15px;
            box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
        }
        
        .btn-glow {
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }
        
        .btn-glow:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
        }
        
        .recording-indicator {
            animation: pulse 1.5s ease-in-out infinite;
        }
        
        @keyframes pulse {
            0% { opacity: 1; }
            50% { opacity: 0.5; }
            100% { opacity: 1; }
        }
        
        .event-list {
            max-height: 300px;
            overflow-y: auto;
        }
        
        .event-item {
            background: rgba(255, 255, 255, 0.05);
            margin: 5px 0;
            padding: 10px;
            border-radius: 8px;
            font-size: 12px;
            transition: all 0.3s ease;
        }
        
        .event-item:hover {
            background: rgba(255, 255, 255, 0.1);
            transform: translateX(5px);
        }
    </style>
</head>
<body>
    <div class="container mx-auto max-w-4xl">
        <div class="text-center mb-8">
            <h1 class="text-4xl font-bold text-white mb-2">
                <i class="fas fa-magic mr-3"></i>按键精灵 Lite
            </h1>
            <p class="text-white/80">轻量级鼠标键盘录制回放工具</p>
        </div>

        <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
            <!-- 控制面板 -->
            <div class="glass-card p-6">
                <h2 class="text-xl font-semibold text-white mb-4">
                    <i class="fas fa-cog mr-2"></i>控制面板
                </h2>
                
                <div class="space-y-4">
                    <div>
                        <button id="recordBtn" class="btn btn-error btn-glow w-full">
                            <i class="fas fa-circle mr-2"></i>开始录制
                        </button>
                    </div>
                    
                    <div>
                        <button id="playBtn" class="btn btn-success btn-glow w-full" disabled>
                            <i class="fas fa-play mr-2"></i>开始回放
                        </button>
                    </div>
                    
                    <div>
                        <button id="clearBtn" class="btn btn-ghost text-white btn-glow w-full">
                            <i class="fas fa-trash mr-2"></i>清空记录
                        </button>
                    </div>
                </div>

                <div class="mt-6">
                    <label class="text-white/90 text-sm mb-2 block">回放速度</label>
                    <input type="range" id="speedSlider" min="0.25" max="4" value="1" step="0.25" 
                           class="range range-primary">
                    <div class="text-center text-white/80 text-sm mt-1">
                        <span id="speedDisplay">1.0x</span>
                    </div>
                </div>

                <div class="mt-4 text-xs text-white/60">
                    <p><i class="fas fa-info-circle mr-1"></i>快捷键:</p>
                    <p>Ctrl+Shift+R: 开始/停止录制</p>
                    <p>Ctrl+Shift+P: 开始/停止回放</p>
                </div>
            </div>

            <!-- 状态面板 -->
            <div class="glass-card p-6">
                <h2 class="text-xl font-semibold text-white mb-4">
                    <i class="fas fa-chart-bar mr-2"></i>状态信息
                </h2>
                
                <div class="space-y-3 text-white/90">
                    <div class="flex justify-between">
                        <span>录制状态:</span>
                        <span id="recordStatus" class="text-success">已停止</span>
                    </div>
                    
                    <div class="flex justify-between">
                        <span>回放状态:</span>
                        <span id="playStatus" class="text-success">已停止</span>
                    </div>
                    
                    <div class="flex justify-between">
                        <span>事件数量:</span>
                        <span id="eventCount">0</span>
                    </div>
                    
                    <div class="flex justify-between">
                        <span>录制时长:</span>
                        <span id="recordDuration">0.0s</span>
                    </div>
                </div>

                <div class="mt-4">
                    <h3 class="text-white/90 text-sm mb-2">最近事件</h3>
                    <div id="eventList" class="event-list">
                        <div class="text-center text-white/60 py-8">
                            <i class="fas fa-inbox text-2xl mb-2"></i>
                            <p>暂无事件记录</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="renderer.js"></script>
</body>
</html>
